export interface User {
    id: number
    username: string
    email: string
    avatar?: string
    roles: Role[]
    permissions: string[]
    createdAt: string
    updatedAt: string
}

export interface Role {
    id: number
    name: string
    code: string
    description?: string
    permissions: Permission[]
}

export interface Permission {
    id: number
    name: string
    code: string
    type: 'menu' | 'button' | 'api'
    parentId?: number
    path?: string
    component?: string
    icon?: string
    sort: number
}

export interface LoginForm {
    username: string
    password: string
    remember?: boolean
}

export interface LoginResult {
    token: string
    user: User
}

export interface UserPageParams {
    current: number
    pageSize: number
    username?: string
    email?: string
    roleId?: number
} 